package com.example.myspringboot.web.vavrA;

import com.example.myspringboot.service.vavrImpl.AsynchronousExample;
import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author cy
 * @date 2024/5/28
 */
@RestController
@RequiredArgsConstructor
@Slf4j
@RequestMapping("/asy")
public class AsyncController {
    private final AsynchronousExample asyncExample;

    @RequestMapping("/async")
    public String asyncMethod() {
        asyncExample.asyncMethod();
        System.out.println("success");
        return "success";
    }
}
